<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta charset="UTF-8">
    <title>Bob Website</title>
    <link rel="stylesheet" href="./drawer.css"/>
</head>

<body>
    <div></div>
    <button id="btn1">按钮1</button>
    <button id="btn2">按钮2</button>
    <div id="content">测试内容太123123123</div>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script src="./drawer.js"></script>
    <script>
        var d1 = new CtoDrawer({
            id: 'dawer1',
            width: '200px',
            showClose: true,
            title: '提示',
            content: document.getElementById('content'),
        });

        document.getElementById('btn1').onclick = function() {
            d1.show();
        }

        var d2 = new CtoDrawer({
            id: 'dawer2',
            showClose: true,
            title: '提示',
            content: document.getElementById('content'),
        });

        document.getElementById('btn2').onclick = function() {
            d2.show();
        }
    </script>
</body>

</html>